﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace Ultimate_Gladiator
{
    class hitTestObject
    {
        public static Boolean hitTest(Texture2D obj1Plaatje, Texture2D obj2Plaatje, Vector2 obj1Pos, Vector2 obj2Pos)
        {
            if (obj1Pos.X + obj1Plaatje.Width >= obj2Pos.X 
                && obj1Pos.X <= obj2Pos.X + obj2Plaatje.Width
                && obj1Pos.Y + obj1Plaatje.Height >= obj2Pos.Y 
                && obj1Pos.Y <= obj2Pos.Y + obj2Plaatje.Height
            )
            {
                return true;
            }
            else{
                return false;
            }
            
        }
    }
}